package ad_exercise_2.model;

import java.util.HashSet;

/**
 * @author Karen Berntsen (s0815799)
 * @author Erik Stens (s0615374)
 */
public class ExtendedHashSet<E> extends HashSet<E> {
	private static final long	serialVersionUID	= -719552028855035581L;
	
	public E addAndReturn(E e) {
		for (E e2 : this) {
			if (e2.equals(e))
				return e2;
		}
		add(e);
		return e;
	}
}
